package com.findme.redis;

import java.util.Observable;

public class Watched extends Observable {

    private Integer data = -1;

    public Integer getData() {

        return data;
    }

    public void setData(Integer data) {
        if (!this.data.equals(data)) {
            this.data = data;
            // 表示目标发生了变化
            setChanged();
        }
        notifyObservers(data);
    }
}
